#!/bin/bsah
#

read -p "输入mysql用户名:" user
read -p "输入密码:" password



list=$(mysql -u${user} -p${password} -e "show processlist" | sed '1d' | wc -l )

if [ $list -ge (10-1) ]; then
 echo "警告"
else
  echo "正常"
fi

